<?php
class index
{
    public $_layout = null; //default layout
    
    public function run(){
        /*** page defaults ***/
        $this->header->css = array('');
        $this->header->js = array('');
        /*$this->header->meta = array(array('name'=>'description','content'=>'This is my site'),
                                    array('name'=>'keywords','content'=>'site,site'));*/
        /*** page defaults (end) ***/
        
        if(Session::has('current_user')){
            
        }
        else{
            $this->header->title = "Welcome to .....";
            if($_SERVER['REQUEST_METHOD'] == 'POST'){
                $required_fields = Validation::run($_POST);
                if($required_fields){
                    $this->view->required = $required_fields;
                }
                else{
                    //success
                }
                
            }
        }
    }
}


 